import VueRouter from 'vue-router';

// 导入子组件
import homeContent from './compoents/tabbar/homeContent.vue';
import personContent from './compoents/tabbar/personContent.vue';
import shoppingContent from './compoents/tabbar/shoppingcarContent.vue';
import searchContent from './compoents/tabbar/searchContent.vue';
import newslist from './compoents/new/newslist.vue';
import newInfo from './compoents/new/newInfo.vue';
import photolist from './compoents/potolist/potolist.vue';
import photoInfo from './compoents/potolist/photoInfo.vue';
import goodslist from './compoents/goods/goodslist.vue';
import goodsInfo from './compoents/goods/goodsInfo.vue';
import goodsDese from './compoents/goods/goodsDesc.vue';
import goodsComent from './compoents/goods/goodsComment.vue';


var router = new VueRouter({
    routes: [
        {
            path:'/',redirect:'/home'
        },
        {
            path: '/home',
            component: homeContent
        },
        {
            path: '/person',
            component: personContent
        },
        {
            path: '/shoppingcar',
            component: shoppingContent
        },
        {
            path: '/search',
            component: searchContent
        },
        {
            path:'/home/newslist',
            component:newslist
        },
        {
            path:'/home/newInfo/:id',
            component: newInfo
        },
        {
            path:'/home/photolist',
            component:photolist
        },
        {
            path:'/home/photoInfo/:id',
            component:photoInfo
        },
        {
            path:'/home/goodslist',
            component:goodslist
        },
        {
            path:'/home/goodsInfo/:id',
            component:goodsInfo,
            name:'detail'
        },
        {   
            path:'/home/goDese/:id',
            component: goodsDese,
            name:'goodsDesc'
        },
        {
            path:'/home/goComment/:id',
            component: goodsComent,
            name:'goodsComment'
        }
    ],
    linkActiveClass: 'mui-active'
});

// 将变量暴露出去
export default router;